package com.zq.designpaterns.other.businessdelegate;

/**
 * ================================================
 * 作    者：程志强
 * 邮    箱：cheng.zhiqiang@cesgroup.com.cn
 * 版    本：1.0.0
 * 创建日期：2021/01/26  11:36
 * 修改日期：
 * 描    述：创建业务代表
 * 修订历史：
 * ================================================
 */
public class BusinessDelegate {
    private final BusinessLookUp lookUp = new BusinessLookUp();
    private String serviceType;

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public void doTask() {
        BusinessService businessService = lookUp.getBusinessService(serviceType);
        businessService.doProcessing();
    }
}
